package com.nova.bluetooth.base;

import com.iflytek.aiui.AIUIEvent;
import com.iflytek.aiui.player.core.PlayState;

import org.greenrobot.eventbus.EventBus;
import org.json.JSONObject;

public class CommonMessageWrap {

    private PlayState playState;

    public PlayState getPlayState() {
        return playState;
    }

    public CommonMessageWrap(int eventCode, PlayState state) {
        this.eventCode = eventCode;
        this.playState = state;
    }


    private JSONObject mJsonObject;

    public JSONObject getmJsonObject() {
        return mJsonObject;
    }

    public CommonMessageWrap(int eventCode, JSONObject jsonObject) {
        this.eventCode = eventCode;
        this.mJsonObject = jsonObject;
    }


    public CommonMessageWrap(int eventCode, String message) {
        this.eventCode = eventCode;
        this.message = message;
    }

    private int messageId;

    public int getMessageId() {
        return messageId;
    }

    public void setMessageId(int messageId) {
        this.messageId = messageId;
    }

    public CommonMessageWrap(int eventCode, int id) {
        this.eventCode = eventCode;
        this.messageId = id;
    }

    private int eventCode ;
    private String message;

    public int getEventCode() {
        return eventCode;
    }

    public void setEventCode(int eventCode) {
        this.eventCode = eventCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static void publishAIUIEventMessage(int code, AIUIEvent event) {
        EventBus.getDefault().post(new CommonMessageWrap(code, event));
    }

    public static void publishMessage(int code, String message) {
        EventBus.getDefault().post(new CommonMessageWrap(code, message));
    }

    private Object object;

    public CommonMessageWrap(int eventCode, Object object) {
        this.eventCode = eventCode;
        this.object = object;
    }

    public Object getObject() {
        return object;
    }

//    classifyId
    public static final int ACTION_UPDATE_CLASSIFY_ID = 2; //
    public static final int ACTION_UPDATE_BLUR_VISIBILITY = 2; // 毛玻璃显示和隐藏
    public static final int ACTION_REFRESH_AI_CHAT_REFRESH_USER = 10;//刷新 获取最近使用指令列表

    public static final int ACTION_AIUI_TTS_RESULT = 0xa1; //语音合成结果

    public static final int ACTION_AIUI_LISTENER_DATA = 0xa2; //aiui 事务处理

    public static final int ACTION_AIUI_SEND_JSON_DATA = 0xb0; //aiuiService 发送json数据
    public static final int ACTION_SET_QUESTION_TO_TEXT_DATA = 0xb1; //aiuiService 发送语音识别结果
    public static final int ACTION_PAY_CLOUD_SPACE_RESULT_OK = 0xb2; //云空间会员支付完成
    public static final int ACTION_FINISH_TO_GPT_CHAT = 0xb3; //结束需要关闭的Activity，跳转到GPT对话界面

    public static final int ACTION_FINISH_TO_AI_CHAT_COPY = 0xb4; //结束需要关闭的Activity
    public static final int ACTION_Start_AI_CHAT_COPY = 0xb5; //需要根据广播开启Activity
}
